var max_counter = 5;
var counter = 1;

// Pre-Download all images first
var images = new Array();
for(var i=1; i<=max_counter; ++i)
{
	images[i] = new Image();
	images[i].src = 'design'+counter+'.jpg';
}

function change_image()
{
	++counter;
	if(counter>max_counter) counter=1;
	image = "url('design"+counter+".jpg')";
	document.body.style.backgroundImage = image;
}
document.body.onclick = change_image;